package xueisen

import "fmt"

func Login() {
	var ztr renlei
	ztr.mingzhi = "张庹然"
	ztr.yonghuming = "ztr"
	ztr.nianling = "21"
	ztr.mima = "123456"

	var zys renlei
	zys.mingzhi = "郑钰凇"
	zys.yonghuming = "zys"
	zys.nianling = "22"
	zys.mima = "123456"
	zys.penyou = &ztr
	ztr.penyou = &zys

	var no string
	fmt.Println("请输入用户名")
	fmt.Scanln(&no)
	var pswd string
	fmt.Println("请输入密码")
	fmt.Scanln(&pswd)
	if no == ztr.yonghuming && pswd == ztr.mima {
		fmt.Println(ztr.mingzhi + "同学报道成功,你的朋友是" + ztr.penyou.mingzhi)
	} else {
		fmt.Println("用户名或密码错误，请重试")
	}
}

type renlei struct {
	mingzhi    string
	yonghuming string
	nianling   string
	mima       string
	penyou     *renlei
}

type xueisen struct {
	renlei
	xueihao string
}
